{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "65d45fa0",
   "metadata": {},
   "outputs": [],
   "source": [
    "from transformers import AutoTokenizer\n",
    "\n",
    "AutoTokenizer.from_pretrained('gpt2-large').save_pretrained(\n",
    "    'tokenizer/gpt2-large')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ba345732",
   "metadata": {},
   "outputs": [],
   "source": [
    "from datasets import load_dataset\n",
    "\n",
    "load_dataset('b-mc2/sql-create-context').save_to_disk(\n",
    "    'dataset/b-mc2/sql-create-context')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4341f356",
   "metadata": {},
   "outputs": [],
   "source": [
    "from transformers import AutoModelForCausalLM\n",
    "\n",
    "AutoModelForCausalLM.from_pretrained('gpt2-large').save_pretrained(\n",
    "    'model/gpt2-large')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:pt2]",
   "language": "python",
   "name": "conda-env-pt2-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
